package com.ruoyi.system.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.List;

/**
 * 科室对象 department
 * 
 * @author ruoyi
 * @date 2024-02-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Department extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 科室id */
    private Long id;

    /** 科室名称 */
    @Excel(name = "科室名称")
    private String name;

    /** 上级科室id */
    @Excel(name = "上级科室id")
    private Long pid;

    /** 删除状态，0未，1删除 */
    @Excel(name = "删除状态，0未，1删除")
    private Long del;

    //子部门
    private List<Department> department;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("pid", getPid())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("del", getDel())
            .toString();
    }
}
